James McGranahan (1840–1907) was an American composer and music educator, primarily known for his contributions to hymnody and sacred music. He was associated with the gospel and hymn genres, and his work significantly influenced American church music in the late 19th and early 20th centuries. McGranahan is best known for his hymn tunes, with "The Haven of Rest" (1880) being one of his most notable works. This hymn became widely popular and is still sung in many churches today. He also collaborated with prominent hymn writers, including William C. Dix and William J. Kirkpatrick, contributing to various hymnals. In addition to composing, McGranahan was instrumental in music education. He served as a music director and teacher, advocating for better music instruction in churches. His approach helped shape the development of congregational singing practices during a transformative period in American worship. Overall, McGranahan's impact on music lies in his ability to blend traditional hymnody with new musical ideas, making sacred music more accessible and engaging for congregations, thereby leaving a lasting legacy in the field of church music.